#include<libcell_wrapper.h>
#include<Mesh_IO/Mesh_IO.h>
//#include<tool/libcell_tools_formats.h>
#include<macros.h>
#include<tool/libcell_tools_algorithm.h>

void test_cut()
{
    Mesh mesh;
    Mesh_init(&mesh);
    _ReadOff_(&mesh,"sphere1.off",3);
    Node* n=NULL;
    for(int i=0;i<19;i++)
    {
        template_v* v=mesh.get_vertexp(&mesh,i+2);
        n=node_overlying(n,v);
    }
    printf("node :%d\n",node_size(n) );
    Mesh_cut_along_the_curvev(&mesh,n); 
    Mesh_free(&mesh);
    free_node(n);
    printf("nihao\n");

}
RB_Tree_Node* get_rb_tree_node()
{
    RB_Tree_Node* re=(RB_Tree_Node*)malloc(sizeof(RB_Tree_Node));
    rb_tree_node_init(re);
    return re; 
}
Node* get_node()
{
    Node* re=(Node*)malloc(sizeof(Node));
    Node_init(re);
    return re;
}
template_v* get_vertex()
{

    template_v* re=(template_v*)malloc(sizeof(template_v));
    Vertex_init_(re);

    re->cells=get_node();
    return re;
}